home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / gadgets / button.h next >
Encoding:
C/C++ Source or Header  |  1999-10-19  |  4.6 KB  |  151 lines

  1. #ifndef GADGETS_BUTTON_H
  2. #define GADGETS_BUTTON_H
  3. /*
  4. **    $VER: button.h 44.1 (19.10.1999)
  5. **    Includes Release 44.1
  6. **
  7. **    button.gadget definitions
  8. **
  9. **    (C) Copyright 1987-1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. /*****************************************************************************/
  14.  
  15. #ifndef REACTION_REACTION_H
  16. #include <reaction/reaction.h>
  17. #endif
  18.  
  19. #ifndef INTUITION_GADGETCLASS_H
  20. #include <intuition/gadgetclass.h>
  21. #endif
  22.  
  23. #ifndef IMAGES_BEVEL_H
  24. #include <images/bevel.h>
  25. #endif
  26.  
  27. /*****************************************************************************/
  28.  
  29. /* Additional attributes defined by the button.gadget class
  30.  * Our class supports most functions of C= button developer release,
  31.  * however we support many additional options as noted below.
  32.  */
  33.  
  34. #define BUTTON_Dummy            (TAG_USER+0x04000000)
  35.  
  36. #define    BUTTON_PushButton        (BUTTON_Dummy+1)
  37.     /* (BOOL) Indicate whether button stays depressed when clicked */
  38.  
  39. #define    BUTTON_Glyph            (BUTTON_Dummy+2)
  40.     /* (struct Image *) Indicate that image is to be drawn using
  41.      * BltTemplate. Note this tag is only partial support, only single
  42.      * plane glyphs are rendered correctly.
  43.      */
  44.  
  45. #define    BUTTON_TextPen            (BUTTON_Dummy+5)
  46.     /* (LONG) Pen to use for text (-1 uses TEXTPEN) */
  47.  
  48. #define    BUTTON_FillPen            (BUTTON_Dummy+6)
  49.     /* (LONG) Pen to use for fill (-1 uses FILLPEN) */
  50.  
  51. #define    BUTTON_FillTextPen        (BUTTON_Dummy+7)
  52.     /* (LONG) Pen to use for fill (-1 uses FILLTEXTPEN) */
  53.  
  54. #define    BUTTON_BackgroundPen    (BUTTON_Dummy+8)
  55.     /* (LONG) Pen to use for fill (-1 uses BACKGROUNDPEN) */
  56.  
  57. #define BUTTON_RenderImage        GA_Image
  58. #define BUTTON_SelectImage        GA_SelectRender
  59.  
  60. #define    BUTTON_BevelStyle        (BUTTON_Dummy+13)
  61.     /* Bevel Box Style */
  62.  
  63. #define BUTTON_Transparent        (BUTTON_Dummy+15)
  64.     /* Button is transparent, EraseRect fill pattern used (if any)
  65.      * to render button background.
  66.      */
  67.  
  68. #define BUTTON_Justification    (BUTTON_Dummy+16)
  69.     /* LEFT/RIGHT/CENTER jutification of GA_Text text */
  70.  
  71. #define BUTTON_SoftStyle        (BUTTON_Dummy+17)
  72.     /* Sets Font SoftStyle, ie, Bold, Italics, etc */
  73.  
  74. #define BUTTON_AutoButton        (BUTTON_Dummy+18)
  75.     /* Automatically creates a button with standard scaled glyphs */
  76.  
  77. #define BUTTON_VarArgs            (BUTTON_Dummy+19)
  78.     /* Argument array for GA_Text varargs string */
  79.  
  80. #define BUTTON_DomainString        (BUTTON_Dummy+20)
  81.     /* (STRPTR) default string used for domain calculation */
  82.  
  83. #define BUTTON_Integer            (BUTTON_Dummy+21)
  84.     /* (int) integer value to display a numeric string.
  85.      * Useful with notifications from sliders, scrollers, etc
  86.      */
  87.  
  88. #define BUTTON_BitMap            (BUTTON_Dummy+22)
  89.     /* (struct BitMap *) BitMap to render in button, rather than an image... */
  90.  
  91. #define BUTTON_AnimButton        (BUTTON_Dummy+50)
  92.     /* (BOOl) Is button animatable?  Use to turn animating on or off */
  93.  
  94. #define BUTTON_AnimImages        (BUTTON_Dummy+51)
  95.     /* (struct Image *) Sets an array of struct Images for animation */
  96.  
  97. #define BUTTON_SelAnimImages    (BUTTON_Dummy+52)
  98.     /* (struct Image *) sets an array of alternate images for a selected
  99.      * state if used, must contain an equal number of images as the
  100.      * array used for BUTTON_AnimImages.  It's wise to use the
  101.      * same sized images too
  102.      */
  103.  
  104. #define BUTTON_MaxAnimImages    (BUTTON_Dummy+53)
  105.     /* (LONG) Number of images available in the arrays */
  106.  
  107. #define BUTTON_AnimImageNumber     (BUTTON_Dummy+54)
  108.     /* (LONG) Current image number in the array(s) to use
  109.      * the range of available frames is 0..MaxAnimImages-1
  110.      */
  111.  
  112. #define BUTTON_AddAnimImageNumber (BUTTON_Dummy+55)
  113.     /* (ULONG) Value to be added to the current image number counter
  114.      * the counter will wrap around at MaxAnimImages
  115.      */
  116.  
  117. #define BUTTON_SubAnimImageNumber (BUTTON_Dummy+56)
  118.     /* (ULONG) Value to be subtracted from the current image number counter
  119.      * the counter will wrap around when less than 0
  120.      */
  121.  
  122. /****************************************************************************/
  123.  
  124. /* Justification modes for BUTTON_Justification.
  125.  */
  126. #define BCJ_LEFT    0
  127. #define BCJ_CENTER    1        /* default - center text */
  128. #define BCJ_RIGHT    2
  129.  
  130. #define BCJ_CENTRE BCJ_CENTER
  131.  
  132. /* Built-in button glyphs for BUTTON_AutoButton.
  133.  */
  134.  
  135. #define BAG_POPFILE        1    /* popup file req */
  136. #define BAG_POPDRAWER    2    /* popup drawer req */
  137. #define BAG_POPFONT        3    /* popup font req */
  138. #define BAG_CHECKBOX    4    /* check glyph button */
  139. #define BAG_CANCELBOX    5    /* cancel glyph button */
  140. #define BAG_UPARROW        6    /* up arrow */
  141. #define BAG_DNARROW        7    /* down arrow */
  142. #define BAG_RTARROW        8    /* right arrow */
  143. #define BAG_LFARROW        9    /* left arrow */
  144. #define BAG_POPTIME        10    /* popup time glyph */
  145. #define BAG_POPSCREEN    11    /* popup screen mode glyph */
  146. #define BAG_POPUP        12    /* generic popup */
  147.  
  148. /*****************************************************************************/
  149.  
  150. #endif /* GADGETS_BUTTON_H */
  151.